all : myirc myircd policy

myirc : 
	javac ./client/*.java
	rmic -keep client.Client
	
myircd :
	javac ./exception/*.java
	javac ./client/*.java
	javac ./server/*.java
	rmic -keep server.Server

policy:
	cp ../resources/server.policy .
	cp ../resources/client.policy .
	cp ../resources/serverkeys.ks .
	cp ../resources/servertrust.ks .
	cp ../resources/clientkeys.ks .
	cp ../resources/clienttrust.ks .
	cp ./server/RMISSLClientSocketFactory.class server/classes/
	mkdir ./server/classes
	

.PHONY: clean

clean :
	-rm */*.class
	-rm client/Client_Stub.java
	-rm server/Server_Stub.java
	-rm *.policy
	-rm *.ks
	-rm server/classes/*
	-rmdir server/classes

